using System;
using System.ComponentModel;

namespace CodeStory.WebControls
{
	public delegate void PropertyGridEventHandler(object sender, PropertyGridEventArgs e);
	public class PropertyGridEventArgs : EventArgs
	{
		private object selectedObject;
		public PropertyGridEventArgs() {

		}
		public PropertyGridEventArgs(object selectedObject) {
			this.selectedObject = selectedObject;
		}
		public object SelectedObject {
			get { return selectedObject; }
			set { selectedObject = value; }
		}
	}

	public delegate void PropertyGridCreateItemEventHandler(object sender,PropertyGridCreateItemEventArgs e);
	public class PropertyGridCreateItemEventArgs : EventArgs {
		private PropertyDescriptor propertyDescripor;
		private bool cancel = false;
		public PropertyGridCreateItemEventArgs() {

		}

		public PropertyGridCreateItemEventArgs(PropertyDescriptor descriptor) {
			this.propertyDescripor = descriptor;
		}

		public PropertyDescriptor PropertyDescripor {
			get { return propertyDescripor; }
			set { propertyDescripor = value; }
		}
		public bool Cancel {
			get { return cancel; }
			set { cancel = value; }
		}
	}
}